package com.en.effectiveJava.chapter2.noCreateSameObject5;

public class StringTest {

    public static void main(String[] args) {
        String a = "abcdefg";
        String b = "abcdefg";
        String c = new String("abcdefg");

        /**
         * a 和 b 是同一个对象，c 是一个新的对象
         */
        System.out.println(a == b);
        System.out.println(b == c);
    }
}
